x86/hvm: avoid potential NULL pointer dereferences
authorPaul Durrant <paul.durrant@citrix.com>
Fri, 10 Jul 2015 15:45:46 +0000 (17:45 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 10 Jul 2015 15:45:46 +0000 (17:45 +0200)
commit47b4d562b6a3441020fb6a7762603d1d3a74db27
treec475ac12d8f8b3039dac5d747592277ac0f41bba
parent4012b9a4660e2db686d0592fc91318b7fd89b3de
x86/hvm: avoid potential NULL pointer dereferences

Coverity flagged that hvm_next_io_handler() will return NULL after
calling domain_crash() and this will then lead to NULL pointer
dereferences in calling functions.

This patch checks for NULL in the callers and bails in that case.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/intercept.c
xen/arch/x86/hvm/io.c
xen/arch/x86/hvm/stdvga.c